﻿using System.Collections.Generic;

namespace ControleRepresentante.Logic.Statistics
{
    public class PedidoStatistics : StatisticsBase
    {
        public PedidoStatistics(int modelCount, int pecas, double valorTotal, double porcentagem, Dictionary<string, double> vendedores, Dictionary<string, double> fabricas) 
            : base(modelCount)
        {
            Pecas = pecas;
            ValorTotal = valorTotal;
            Porcentagem = porcentagem;
            Vendedores = vendedores;
            Fabricas = fabricas;
        }

        public int Pecas { get; private set; }
        public double ValorTotal { get; private set; }
        public double ValorMedio { get { return ModelCount == 0 ? 0 : ValorTotal/ModelCount; } }
        public double Porcentagem { get; private set; }
        public Dictionary<string, double> Vendedores { get; private set; }
        public Dictionary<string, double> Fabricas { get; private set; }
    }
}